"""Models"""
from google.appengine.ext import db

class userDetails(db.Model):				  #To store individual student details
	username=db.StringProperty()				#Student name
	email=db.EmailProperty()				#Email of student
	mobilenumber=db.StringProperty()			#Mobile phone number
	admissionnumber=db.StringProperty()			#Admission number
	branch=db.StringProperty()				#College department
	projectids=db.StringProperty()				#Current project IDs
	privilege=db.StringProperty()				#User/administrator
	timestamp=db.DateTimeProperty(auto_now_add=True)	#Data entry time
	approved=db.BooleanProperty()				#Approval status

class projectDetails(db.Model):				  #To store details of confirmed projects to be undertaken
	projectname=db.StringProperty()				#Project name
	projectid=db.StringProperty()				#Project ID
	teamid=db.StringProperty()				#Team ID of team undertaking this project
	category=db.StringProperty()				#Categories under which the project falls
	languages=db.StringProperty()				#Programming languages
	fieldnames=db.StringProperty()				#Field span of the project
	abstract=db.StringProperty()				#Abstract of the project
	reviewdate=db.StringProperty()				#Next review date
	confirmed=db.BooleanProperty()				#Whether project is approved or not
	maxmembers=db.StringProperty()				#Number of members per project (admin property)
	link=db.StringProperty()				#Reference link	
	pool=db.BooleanProperty()				#To check if the project is from the pool

class teamDetails(db.Model):					#Details of individual teams
	teamid=db.StringProperty()				#Team ID
	teammember=db.StringProperty()				#Team members (number variable)
	projectids=db.StringProperty()				#Project IDs of projects under this team
	locked=db.BooleanProperty()				#Team members lock property

class projectPool(db.Model):					#Holds details of projects in the project pool
	poolprojectid=db.StringProperty()			#Temporary project ID in the pool
	projectname=db.StringProperty()				#Project name
	languages=db.StringProperty()				#Programming languages
	abstract=db.StringProperty()				#Project abstract
	category=db.StringProperty()
	fieldnames=db.StringProperty()
	lock=db.BooleanProperty()

class projectCategory(db.Model):				#Admin facility to store project categories
	categoryid=db.StringProperty()				#Category ID
	categorytype=db.StringProperty()			#The name of the category itself
	maxmembers=db.IntegerProperty()				#Maximum number of members in a team who can undertake this type of project
	maxprojects=db.IntegerProperty()

class notificationDetails(db.Model):				#Details of notifications
	notificationid=db.StringProperty()			#Notification ID
	admissionnumber=db.StringProperty()			#Users who are concerned with the notification
	notification=db.StringProperty()			#The notification itself
	
class languages(db.Model):					#Programming languages offered
	languageid=db.StringProperty()				#ID of the programming language
	language=db.StringProperty()				#Programming language
	
class projectFields(db.Model):					#Fields of the projects e.g.ML,HPC,Robotics...
	fieldid=db.StringProperty()				#Field ID
	fieldname=db.StringProperty()				#Name of the field
	
class questionanswer(db.Model):					#Q&A facility
	admissionnumber=db.StringProperty()			#User ID that generated the question
	questionid=db.StringProperty()				#Unique question ID
	question=db.StringProperty()				#The question itself
	answer=db.StringProperty()				#Answer
